package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 设备打卡对象 cus_device_clock
 * 
 * @author ruoyi
 * @date 2022-01-15
 */
public class CusDeviceClock extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 打卡年份 */
    //@Excel(name = "打卡年份")
    private Long clockYear;
    private Long clockYearend;

    /** 打卡月份 */
    //@Excel(name = "打卡月份")
    private Long clockMonth;
    private Long clockMonthend;
    private String clockMonthStr;
    private String clockMonthendStr;

    /** 打卡日期 */
    //@Excel(name = "打卡日期")
    private Long clockDay;
    private Long clockDayend;
    private String clockDayStr;
    private String clockDayendStr;
    
    @Excel(name = "日期")
    private String ddate;
    
    @Excel(name = "星期")
    private String week;
    
    // @Excel(name = "所属部门1")
    private String deptName1;
    
    @Excel(name = "部门")
    private String deptName2;
    
    @Excel(name = "项目编号")
    private String project_code;
    
    /**
     * left join : 项目名称
     * 
     * @see #personProjectId
     */
    @Excel(name = "项目名称")
    private String project_name;
    
    @Excel(name = "设备位置")
    private String position_name;
    
    /**
     * left join : 打卡设备的名称
     * 
     * @see #personId
     */
    @Excel(name = "设备名称")
    private String device_name;
    
    /** 填报日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    // @Excel(name = "填报日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date makeDatetime;
    
    /** 研发开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "开始研发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date startDatetime;

    /** 结束研发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    @Excel(name = "结束研发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm")
    private Date endDatetime;
    
    @Excel(name = "参与研发活动的时间（小时）", isStatistics = true)
    private String countTime = "0";
    
    private Long dept1;
    
    private Long dept2;
    
    

    public String getClockMonthStr() {
		return clockMonthStr;
	}

	public void setClockMonthStr(String clockMonthStr) {
		this.clockMonthStr = clockMonthStr;
	}

	public String getClockMonthendStr() {
		return clockMonthendStr;
	}

	public void setClockMonthendStr(String clockMonthendStr) {
		this.clockMonthendStr = clockMonthendStr;
	}

	public String getClockDayStr() {
		return clockDayStr;
	}

	public void setClockDayStr(String clockDayStr) {
		this.clockDayStr = clockDayStr;
	}

	public String getClockDayendStr() {
		return clockDayendStr;
	}

	public void setClockDayendStr(String clockDayendStr) {
		this.clockDayendStr = clockDayendStr;
	}

	public Long getClockYearend() {
		return clockYearend;
	}

	public void setClockYearend(Long clockYearend) {
		this.clockYearend = clockYearend;
	}

	public Long getClockMonthend() {
		return clockMonthend;
	}

	public void setClockMonthend(Long clockMonthend) {
		this.clockMonthend = clockMonthend;
	}

	public Long getClockDayend() {
		return clockDayend;
	}

	public void setClockDayend(Long clockDayend) {
		this.clockDayend = clockDayend;
	}

	public Long getDept1() {
		return dept1;
	}

	public void setDept1(Long dept1) {
		this.dept1 = dept1;
	}

	public Long getDept2() {
		return dept2;
	}

	public void setDept2(Long dept2) {
		this.dept2 = dept2;
	}

	public String getDeptName1() {
		return deptName1;
	}

	public void setDeptName1(String deptName1) {
		this.deptName1 = deptName1;
	}

	public String getDeptName2() {
		return deptName2;
	}

	public void setDeptName2(String deptName2) {
		this.deptName2 = deptName2;
	}

	/**
     * left join : 开始打卡的操作用户
     * 
     * @see #startPersionId
     */
    private String start_user_name;
    private String user_name;
    
    
    /**
     * left join : 结束打卡的操作用户
     * 
     * @see #endPersionId
     */
    private String end_user_name;

    /**
     * 前端传递的打卡时间，自己解析设置回去打卡年月日字段
     */
    private String clockdatetime;
    
    /** $column.columnComment */
    private Long ID;

    /** 设备 */
    private Long deviceId;

    /** 研发项目 */
    private Long projectId;
    
    

    /** 开始研发操作用户 */
    // @Excel(name = "开始研发操作用户")
    private Long startPersionId;

    /** 结束研发操作人员 */
    // @Excel(name = "结束研发操作人员")
    private Long endPersionId;
    
    private Integer project_status;
    
    public String getDdate() {
		return ddate;
	}

	public void setDdate(String ddate) {
		this.ddate = ddate;
	}

	public String getWeek() {
		return week;
	}

	public void setWeek(String week) {
		this.week = week;
	}

	public String getPosition_name() {
		return position_name;
	}

	public void setPosition_name(String position_name) {
		this.position_name = position_name;
	}

	public Integer getProject_status() {
		return project_status;
	}

	public void setProject_status(Integer project_status) {
		this.project_status = project_status;
	}

	public String getUser_name() {
		return user_name;
	}

	public void setUser_name(String user_name) {
		this.user_name = user_name;
	}

	public String getCountTime() {
		return countTime;
	}

	public void setCountTime(String countTime) {
		this.countTime = countTime;
	}

	public String getProject_code() {
		return project_code;
	}

	public void setProject_code(String project_code) {
		this.project_code = project_code;
	}

	public void setID(Long ID) 
    {
        this.ID = ID;
    }

    public Long getID() 
    {
        return ID;
    }
    public void setDeviceId(Long deviceId) 
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setProjectId(Long projectId) 
    {
        this.projectId = projectId;
    }

    public Long getProjectId() 
    {
        return projectId;
    }
    public void setStartDatetime(Date startDatetime) 
    {
        this.startDatetime = startDatetime;
    }

    public Date getStartDatetime() 
    {
        return startDatetime;
    }
    public void setEndDatetime(Date endDatetime) 
    {
        this.endDatetime = endDatetime;
    }

    public Date getEndDatetime() 
    {
        return endDatetime;
    }
    public void setStartPersionId(Long startPersionId) 
    {
        this.startPersionId = startPersionId;
    }

    public Long getStartPersionId() 
    {
        return startPersionId;
    }
    public void setEndPersionId(Long endPersionId) 
    {
        this.endPersionId = endPersionId;
    }

    public Long getEndPersionId() 
    {
        return endPersionId;
    }
    public void setClockYear(Long clockYear) 
    {
        this.clockYear = clockYear;
    }

    public Long getClockYear() 
    {
        return clockYear;
    }
    public void setClockMonth(Long clockMonth) 
    {
        this.clockMonth = clockMonth;
    }

    public Long getClockMonth() 
    {
        return clockMonth;
    }
    public void setClockDay(Long clockDay) 
    {
        this.clockDay = clockDay;
    }

    public Long getClockDay() 
    {
        return clockDay;
    }

    public String getDevice_name() {
		return device_name;
	}

	public void setDevice_name(String device_name) {
		this.device_name = device_name;
	}

	public String getStart_user_name() {
		return start_user_name;
	}

	public void setStart_user_name(String start_user_name) {
		this.start_user_name = start_user_name;
	}

	public String getEnd_user_name() {
		return end_user_name;
	}

	public void setEnd_user_name(String end_user_name) {
		this.end_user_name = end_user_name;
	}

	public String getProject_name() {
		return project_name;
	}

	public void setProject_name(String project_name) {
		this.project_name = project_name;
	}

	public String getClockdatetime() {
		return clockdatetime;
	}

	public void setClockdatetime(String clockdatetime) {
		this.clockdatetime = clockdatetime;
		
		String[] date = clockdatetime.split(" ")[0].split("-");
		setClockYear(Long.valueOf(date[0]));
		setClockMonth(Long.valueOf(date[1]));
		setClockDay(Long.valueOf(date[2]));
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("ID", getID())
            .append("deviceId", getDeviceId())
            .append("projectId", getProjectId())
            .append("startDatetime", getStartDatetime())
            .append("endDatetime", getEndDatetime())
            .append("startPersionId", getStartPersionId())
            .append("endPersionId", getEndPersionId())
            .append("clockYear", getClockYear())
            .append("clockMonth", getClockMonth())
            .append("clockDay", getClockDay())
            .toString();
    }
}
